<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>videoSearch</title>
</head>
<body>
<?php 
require_once("inc_admin.php");
require_once("menu.php");
connect();
$id = $_GET['id'];
$sql = "select * from videos where tid={$id}"; 
$result = fetch_array($sql); 
?> 
<center><h3>各类型视频</h3></center>
 <table align="center" width="80%" border=1> 
 <tr>
   <th>用户编号</th>
   <th>视频名称</th>   
   <th>视频类型</th>
   <th>海报</th>
   <th>内容简介</th>
   <th>添加日期</th>
   <th>上传用户</th> 
   <th>点击率</th> 
   <th>下载量</th> 
   <th>下载地址</th> 
   <th>操作</th> 
 </tr>
 <?php
  if($result == null )
    {
      echo ' ';
    }
    else {
 foreach ($result as $one ) 
 {  
	 echo '<tr>';
	 echo '<td>'.$one['vid'].'</td>';
	 echo '<td>'.$one['videoname'].'</td>';	 
	 echo '<td>'.$one['tid'].'</td>';
	 echo '<td>'.$one['pic'].'</td>';
   echo '<td>'.$one['intro'].'</td>'; 
   echo '<td>'.$one['uploaddate'].'</td>';
   echo '<td>'.$one['uploadadmin'].'</td>';
   echo '<td>'.$one['hittimes'].'</td>';
	 echo '<td>'.$one['downtimes'].'</td>';
   echo '<td>'.$one['address'].'</td>';
	 echo '<td>
   <a href="videoForm.html">添加</a> |'.
   '<a href="videoEditForm.php?id='.$one['vid'].' ">修改</a> | 
	 <a href="videoDelete.php?id='.$one['vid'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a></td>';
	 echo '</tr>';  
  }
  echo '</table>';  
  $totalrows = count($result);
  echo "<table align='center'><tr><td>共有{$totalrows}条视频信息</td></tr></table>"; 
  }  
 ?>
</body>
</html>